# -*- coding: UTF-8 -*-
'''
Created on 09/10/2014

@author: Eduardo Cardeira - Num 6033

Exemplo 3 da Aula Teorica 3

'''
lista = ['a', 'b', 'c']
it = iter(lista)
print it
x1 = it.next()
print x1
x2 = it.next()
print x2
pass

lista = ['a', 'b', 'c', 'd', 'e']
it = iter(lista)
x = it.next()
try:
    while it:
        print x
        x = it.next()
except StopIteration:
    print 'End of List'
    pass
pass